import 'package:flutter/material.dart';
import 'package:zhihuishop/pages/home/component/home_shop_list_item.dart';

class HomeShopList extends StatefulWidget {
  HomeShopList({super.key, required this.goodsList});

  List goodsList = [];

  @override
  State<HomeShopList> createState() => _HomeShopListState();
}

class _HomeShopListState extends State<HomeShopList> {
  @override
  Widget build(BuildContext context) {
    return ListView.separated(
        shrinkWrap: true,
        physics: const NeverScrollableScrollPhysics(),
        itemBuilder: (context, index) {
          return HomeShopListItem(item: widget.goodsList[index]);
        },
        separatorBuilder: (context, index) {
          return Container(
            height: 10,
            color: const Color.fromARGB(255, 239, 232, 232),
          );
        },
        itemCount: widget.goodsList.length);
  }
}
